package com.xuecheng.framework.exception;

import com.xuecheng.framework.model.response.ResultCode;

public class CustomException extends RuntimeException{
    private ResultCode resultCode;
    public CustomException(ResultCode resultcode){
        //异常信息为错误代码+异常信息
        super("错误代码:"+resultcode.code()+"异常信息:"+resultcode.message());
        this.resultCode=resultcode;
    }
    public ResultCode getResultCode(){
        return this.resultCode;
    }
}
